package org.lzy.shop.response

/**
 * 主页响应数据类
 */
data class HomeResponse(
    var coupon: MutableList<CouponDTO>? = null,
    var banner: List<BannerDTO>? = null,
    var goods: MutableList<GoodsDTO>? = null,
    var flashSale: MutableList<FlashSaleDTO>? = null,
    var recommend: MutableList<RecommendDTO>? = null,
    var categoryAll: MutableList<CategoryAllDTO>? = null,
    var category: List<CategoryDTO>? = null
) {
    /**
     * 优惠券数据类
     */
    data class CouponDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var title: String? = null,
        var type: Int = 0,
        var amount: Int = 0,
        var endTime: String? = null,
        var status: Int = 0,
        var condition: ConditionDTO? = null
    ) {
        /**
         * 优惠券使用条件数据类
         */
        data class ConditionDTO(
            var fullAmount: Int = 0
        )
    }

    /**
     * Banner数据类
     */
    data class BannerDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var path: String? = null,
        var pic: String? = null,
        var sortNum: Int = 0,
        var status: Int = 0
    )

    /**
     * 商品数据类
     */
    data class GoodsDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var typeId: Int = 0,
        var title: String? = null,
        var subTitle: String? = null,
        var mainPic: String? = null,
        var pics: MutableList<String?>? = null,
        var price: Int = 0,
        var sold: Int = 0,
        var content: Any? = null,
        var contentPics: MutableList<String?>? = null,
        var isRecommend: Boolean = false,
        var isFeatured: Boolean = false,
        var status: Int = 0,
        var sortNum: Int = 0,
        var specs: Any? = null
    )

    /**
     * 限时抢购数据类
     */
    data class FlashSaleDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var typeId: Int = 0,
        var title: String? = null,
        var subTitle: String? = null,
        var mainPic: String? = null,
        var pics: MutableList<String?>? = null,
        var price: String? = null,
        var sold: String? = null,
        var content: String? = null,
        var status: Int = 0,
        var sortNum: Int = 0,
        var specs: Any? = null
    )

    /**
     * 推荐商品数据类
     */
    data class RecommendDTO(
        //商品评论Id
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var typeId: Int = 0,
        //商品评论I标题
        var title: String? = null,
        //商品评论I副标题
        var subTitle: String? = null,
        //商品评论I主图
        var mainPic: String? = null,
        var pics: MutableList<String?>? = null,
        //商品评论I价格
        var price: String? = null,
        //商品评论I已售多少个
        var sold: String? = null,
        var content: Any? = null,
        var contentPics: MutableList<String?>? = null,
        var isRecommend: Boolean = false,
        var isFeatured: Boolean = false,
        var status: Int = 0,
        var sortNum: Int = 0,
        var specs: Any? = null
    )

    /**
     * 全部分类数据类
     */
    data class CategoryAllDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var name: String? = null,
        var parentId: Any? = null,
        var sortNum: Int = 0,
        var pic: String? = null,
        var status: Int = 0
    )

    /**
     * 分类数据类
     */
    data class CategoryDTO(
        var id: Int = 0,
        var createTime: String? = null,
        var updateTime: String? = null,
        var name: String? = null,
        var sortNum: Int = 0,
        var pic: String? = null,
        var status: Int = 0
    )
}